/* 
* TODO: 1. Place the .txt data file and the dictionary file you downloaded in the work folder, or enter the full path to these files!
*       2. You may have to increase memory using the 'set mem' statement. It is commented out in the code bellow.
*
* If you have any questions or need assistance contact info@socialexplorer.com.
*/

///set mem 512m
clear all
version 11
set more off
cd "C:\Users\hd233\Dropbox\Yale\Research\APEEP\data\income"
infile using "2000_R12408293.dct", using("2000_R12408293_SL050.txt") clear

destring FIPS, generate(fips)
ren T145_001 income_2000usd
ren T001_001 pop
keep fips income* pop
codebook income*

/*
-----------------------------------------------------------------------------------------------------------------------------
income_2000usd                               Per capita income In 2000 Dollars [Dollars adjusted for inflation to match value
-----------------------------------------------------------------------------------------------------------------------------

                  type:  numeric (double)

                 range:  [4791.2453,46487.693]        units:  1.000e-07
         unique values:  2829                     missing .:  0/3219

                  mean:   17842.5
              std. dev:   4373.73

           percentiles:        10%       25%       50%       75%       90%
                           13728.6   15484.2   17411.4   19544.4   22693.8
*/

compress
saveold data_income_pop_2000, replace

